package cn.t.web.api;

import cn.t.dto.api.WorkOrderCreateRequestDTO;
import cn.t.facade.order.WorkOrderFacade;
import cn.t.response.Response;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * api-工单管理
 *
 * @author t
 * @since 2024-05-24 10:15:14
 */
@Slf4j
@RestController
@RequestMapping("api")

@AllArgsConstructor
public class ApiWorkOrderController {

    private final WorkOrderFacade workOrderFacade;



    /**
     * (客户调用)
     */
    @PostMapping("/api/create")
    public Response<Boolean> createWorkOrder(@RequestBody WorkOrderCreateRequestDTO request) {
        return this.workOrderFacade.createWorkOrder(request);
    }


}

